import Vue from 'vue';
import PopoverComp from './popover.vue';

const PopoverContructor = Vue.extend(PopoverComp);
const instance = new PopoverContructor();

instance.$mount();
document.body.appendChild(instance.$el);

// eslint-disable-next-line
export default {
  show(option) {
    instance.isShow = true;
    instance.top = `${option.top}px`;
    instance.left = `${option.left}px`;
    instance.comp = option.content;
    instance.user = option.data;
  },
  hide() {
    instance.isShow = false;
  },
};
